{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf480
{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fnil\fcharset77 Monaco;\f2\fswiss\fcharset77 Helvetica;
}
{\colortbl;\red255\green255\blue255;\red0\green0\blue255;\red191\green0\blue0;\red0\green0\blue0;
\red0\green0\blue191;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f0\b\fs36 \cf0 FFTTriggered			 Fast Fourier Transform snapshot UGen
\f1\b0\fs18 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural

\f2\fs24 \cf0 \
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\cf0 \
This UGen is deprecated and will be removed. \
\
If you want to do FFT analysis on the server at triggered moments (rather than a regular stream), you can use the {\field{\*\fldinst{HYPERLINK "SC://FFT"}}{\fldrslt \cf2 FFT}} UGen's "active" parameter to trigger it. Here's an example:\
\

\f1\fs18 \cf3 // We'll analyse the spectral centroid, but only when our trigger fires (therefore not very often, more efficient):\cf4 \
s.boot;\
~fftsize = 1024;\
b = \cf5 Buffer\cf4 .alloc(s, ~fftsize);\
(\
\{\
	\cf5 var\cf4  son, trigs, chain, val;\
	\
	son = \cf5 BrownNoise\cf4 .ar;\
	\
	trigs = \cf5 Dust\cf4 .kr(30) > 0;\
	\
	\cf3 // Note, the third argument to FFT (the "hop") here equates to a hopsize of one control-block, i.e. as often as possible:\cf4 \
	chain = \cf5 FFT\cf4 (b, son, s.options.blockSize/~fftsize, active: trigs);\
	\
	val = \cf5 SpecCentroid\cf4 .kr(chain);\
	\
	[trigs, val];\
	\cf3 //comp = (ch1<0) - (ch2<0);\cf4 \
	\
\}.plot(1, minval:[\cf5 nil\cf4 , 0], maxval: [\cf5 nil\cf4 , \cf5 nil\cf4 ]);\
)
\f2\fs24 \cf0 \
\
\
}